package cn.elead.chaos.sso.server.web.login.oauth;

/**
 * Oauth常量
 * 
 * @author luopeng
 *
 */
public interface OauthVariable {
	
	String OAUTH_TGC_PREFIX = "TGC-";
	
	//String OAUTH_CODE_PREFIX = "OC-";
	
	String OAUTH_ACCESS_TOKEN_PREFIX = "AT-";
	
	String OAUTH_REFRESH_TOKEN_PREFIX = "RT-";

	String REDIS_TGC_KEY_PREFIX = "OAUTH:TGC:";

	String REDIS_CLIENT_ID_KEY_PREFIX = "OAUTH:CLIENT_ID:";

	String REDIS_OAUTH_CODE_PREFIX_KEY_PREFIX = "OAUTH:CODE:";

	String REDIS_OAUTH_ACCESS_TOKEN_KEY_PREFIX = "OAUTH:ACCESS_TOKEN:";

	String REDIS_OAUTH_REFRESH_TOKEN_KEY_PREFIX = "OAUTH:REFRESH_TOKEN:";

	String REDIS_OAUTH_USER_INFO_KEY_PREFIX = "OAUTH:USER_INFO:";
	
	String OAUTH_TOKEN_TYPE = "Bearer";
	String OAUTH_TOKEN_TYPE_UPPER_PREFIX = "Bearer ";
	String OAUTH_TOKEN_TYPE_LOWER_PREFIX = "bearer ";
	String BASIC_AUTH_UPPER_PREFIX = "Basic ";
	String BASIC_AUTH_LOWER_PREFIX = "basic ";
	
	String OAUTH_REFRESH_TOKEN_GRANT_TYPE = "refresh_token";
	String OAUTH_CODE_GRANT_TYPE = "authorization_code";
	String OAUTH_CLIENT_GRANT_TYPE = "client_credentials";
	String OAUTH_TOKEN_GRANT_TYPE = "token";
	String OAUTH_PASSWORD_GRANT_TYPE = "password";
	
	String HTTP_HEADER_USER_AGENT = "User-Agent";
	String HTTP_HEADER_AUTHORIZATION = "Authorization";
	

	String OAUTH_ACCESS_TOKEN_KEY = "access_token";
	String OAUTH_REFRESH_TOKEN_KEY = "refresh_token";
	String OAUTH_TOKEN_TYPE_KEY = "token_type";
	String OAUTH_EXPIRES_IN_KEY = "expires_in";
	String OAUTH_ACCESS_TOKEN_TYPE_HINT = "access_token";
}
